<template>
  <div class="footer">
    <div class="footer_cont">
      <div class="shop">
        <i class="iconfont icon-jushoucang"></i>
        <p>店铺</p>
      </div>
      <div class="service">
        <i class="iconfont icon-jushoucang"></i>
        <p>客服</p>
      </div>
      <div class="cart">
        <i class="iconfont icon-jushoucang"></i>
        <p>购物车</p>
      </div>
      <div class="btn addcart" @click="addCart">加入购物车</div>
      <div class="btn buy">
        <span>立即购买</span>
        <p>到手价￥528.00</p>
      </div>
    </div>
  </div>
</template>

<script>
import bus from '@/event/index'
export default {
  methods: {
    addCart(){
      bus.$emit('add')
    }
  }
};
</script>

<style lang="less" scoped>
.footer {
  height: 5.4rem;
  width: 100%;
  background-color: #fff;
  position: fixed;
  bottom: 0;
  padding: 0 0.5rem;
  box-sizing: border-box;
  align-items: center;
  display: flex;
  border-top: 1px solid #f8f8f8;
  .footer_cont {
    width: 100%;
    display: flex;
    height: 4.2rem;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    .btn {
      height: 4.2rem;
      text-align: center;
      color: #fff;
      padding: 0 1rem;
      border-radius: 2.1rem;
    }
    .shop,
    .cart,
    .service {
      flex: 1;
    }
    .addcart {
      line-height: 4.2rem;
      background-color: #ffc707;
      margin-right: 1rem;
      font-size: 1.4rem;
    }
    .buy {
      background-color: #f91f28;
      text-align: center;
      display: flex;
      flex-wrap: wrap;
      width: 9.3rem;
      justify-content: center;
      align-items: center;
      span{
          font-size: 1.4rem;
      }
    }
  }
}
</style>